<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Add</title>
</head>
<body>
    <div>
        <div style="color: red">${errorMsg}</div>
        <form action="${pageContext.request.contextPath}/user/update" method="post">
            <div>
                编号：<input type="text" name="id" value="${sysUser.id}" readonly>
            </div>
            <div>
                账号：<input type="text" name="account" value="${sysUser.account}" disabled>
            </div>
            <div>
                真实姓名：<input type="text" name="realName" value="${sysUser.realName}">
            </div>
            <div>
                密码：<input type="text" name="password" value="${sysUser.password}">
            </div>
            <div>
                性别： <input type="radio" name="sex" value="1"  ${sysUser.sex==1 ? 'checked' : ''}> 女
                <input type="radio" name="sex" value="2" ${sysUser.sex==2 ? 'checked' : ''}> 男
            </div>
            <div>
                出生日期：<input type="text" name="birthday" value="<fmt:formatDate value="${sysUser.birthday}" pattern="yyyy-MM-dd"/>">
            </div>
            <div>
                电话：<input type="text" name="phone" value="${sysUser.phone}">
            </div>

            <div>
                地址：<input type="text" name="address" value="${sysUser.address}">
            </div>

            <div>
                角色：
                <select name="roleId">
                    <option value="1"  ${sysUser.roleId==1 ? 'selected' : ''}>管理系统员</option>
                    <option value="2" ${sysUser.roleId==2 ? 'selected' : ''}>店长</option>
                    <option value="3" ${sysUser.roleId==3 ? 'selected' : ''}>店员</option>
                </select>
            </div>

            <div>
                <input type="submit">
            </div>

        </form>
    </div>
</body>
</html>
